package net.cyndeline.rldungeon.dgs.strategy.pointlessArea

import net.cyndeline.rldungeon.dgs.strategy.help.CollapsedNode
import net.cyndeline.rldungeon.dgs.graph.Room

/**
 * Selects a vertex from within a super-node according to some criteria.
 */
trait RepresentedVertexFinder[V <: Room[V]] {

  /**
   * Finds any represented vertex.
   * @param node Super-node to select vertex from.
   * @return A vertex contained in the super-node. Guaranteed to exist since every node represents at least one vertex.
   */
  def findVertex(node: CollapsedNode[V]): V

  /**
   * Finds a represented vertex that can hold at least one additional reward.
   * @param node Super-node to select vertex from.
   * @return A vertex that can hold an additional reward, or None if no such vertex exists.
   */
  def findVertexThatHoldsRewards(node: CollapsedNode[V]): Option[V]

  /**
    * Finds a represented vertex that can hold at least one additional activator.
    * @param node Super-node to select vertex from.
    * @return A vertex that can hold an additional activator, or None if no such vertex exists.
   */
  def findVertexThatHoldsActivators(node: CollapsedNode[V]): Option[V]

}
